(defun find-from-end-3 (x list)
  (labels ((recursive (x list n)
	     (declare (type fixnum n))
	     (if (zerop n)
		 nil
		 (progn (recursive x (cdr list) (1- n))
			(when (eq x (car list))
			  (return-from find-from-end-3 x))))))
    (labels ((aux (x list n)
	     (declare (type fixnum n))
	       (if (< n 10000)
		   (recursive x list n)
		   (let* ((n/2 (ash n -1))
			  (n/4 (ash n/2 -1))
			  (3n/4 (+ n/2 n/4))
			  (l1 (nthcdr n/4 list))
			  (l2 (nthcdr (- n/2 n/4) l1))
			  (l3 (nthcdr (- 3n/4 n/2) l2)))
		     (aux x l3 (- n 3n/4))
		     (aux x l2 (- 3n/4 n/2))
		     (aux x l1 (- n/2 n/4))
		     (aux x list n/4)))))
      (aux x list (length list)))))
